from django.contrib import admin

from users.models import User


# Register your models here.

class UserAdmin(admin.ModelAdmin):
    list_display = ('id', 'username', 'email', 'mobile', 'is_active', 'is_show', 'gender', 'age', 'nickname', 'signature')
    list_filter = ('is_active', 'is_show', 'gender')
    search_fields = ('username', 'email', 'mobile', 'is_active', 'is_show', 'gender', 'age', 'nickname', 'signature')
    ordering = ('-id',)
    fieldsets = (
        ('基本信息', {'fields': ('username', 'email', 'mobile', 'gender', 'age', 'nickname', 'signature')}),
        ('其他信息', {'fields': ('is_active', 'is_show', 'avatar', 'disable_time')}),
    )

admin.site.register(User, UserAdmin)